const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
    devServer: {
        port: 9000,
        open: true
    },
    outputDir: 'docs',
    publicPath: process.env.NODE_ENV === 'production' ?
        '/mathGen/' : '/',
    productionSourceMap: false,

    pages: { //配置多页面入口        
        qrcode: {
            entry: 'src/qrcode/qrcode.js',
        },
        index: {
            entry: 'src/main.js',
            // template: 'public/index.html',
        },
    },
    configureWebpack: {
        plugins: [
            new CopyWebpackPlugin([{
                from: __dirname + '/src/qrcode-list/qrcode-show.html',
            }])
        ]
    }
}